package net.wofly.sale.order.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.sale.order.repository.IntroducerRepository;
import net.wofly.sale.order.domain.Introducer;
import net.wofly.sale.order.service.IIntroducerService;

@Service("iIntroducerService")
@Transactional
public class IntroducerServiceImpl implements IIntroducerService {

	@Autowired
	IntroducerRepository introducerRepository;

	@Override
	public Introducer save(Introducer entity) {
		return introducerRepository.save(entity);
	}

	@Override
	public void delete(Introducer entity) {
		introducerRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		introducerRepository.delete(key);
	}

	@Override
	public Introducer findOne(String key) {
		return introducerRepository.findOne(key);
	}
	
	@Override
	public Introducer findByOrderID(String orderID) {
		return introducerRepository.findByOrderID(orderID);
	}
	
	@Override
	public List<Introducer> save(List<Introducer> entityList) {
		return (List<Introducer>) introducerRepository.save(entityList);
	}
}
